export const mockReq = (data, randomRange = [0, 3000]) =>
  new Promise((resolve) => {
    const timeOut = Math.trunc(
      Math.random() * (randomRange[1] - randomRange[0]) + randomRange[0]
    )
    setTimeout(() => {
      resolve(data)
    }, timeOut)
  })
